import Vue from "vue"
import VueRouter from "vue-router"

Vue.use(VueRouter)

const routes = [
  {
    path: "/login",
    component: () => import("@/views/login")
  },
  {
    path: "/registe",
    component: () => import("@/views/login/registe")
  },
  {
    path: "/city",
    component: () => import("@/views/City")
  },
  {
    path: "/home",
    component: () => import("@/views/Nav"),
    redirect: "/home ",
    children: [
      {
        path: "/home ",
        component: () => import("@/views/Home")
      },
      {
        path: "/home/list",
        component: () => import("@/views/List")
      },
      {
        path: "/home/news",
        component: () => import("@/views/News")
      },
      {
        path: "/home/profile",
        component: () => import("@/views/My")
      }
    ]
  }
]

const router = new VueRouter({
  routes
})

export default router
